PostCSS FontPath

PostCSS plugin that adds a font-path
attribute to @font-face
which expands to the FontSpring syntax.
Part of Rucksack - CSS Superpowers.
@font-face {
font-family: 'My Font';
font-path: '/path/to/font/file';
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'My Font';
src: url("/path/to/font/file.eot");
src: url("/path/to/font/file.eot?#iefix") format('embedded-opentype'),
url("/path/to/font/file.woff") format('woff'),
url("/path/to/font/file.ttf") format('truetype'),
url("/path/to/font/file.svg") format('svg');
font-weight: normal;
font-style: normal;
}
--
Usage
postcss([ require('postcss-fontpath') ])
See PostCSS docs for examples for your environment.
--
Options
checkPath (boolean, default = false
)
If true, the plugin will check if the path to the font file exists. When not found, the file is skipped in the output and a warning is logged.
--
License
MIT © Sean King